def f(n):
    x, y, z = 0, 1, 1
    l = []
    while len(l) < n:
        x, y = y, z

        z = x + y

        l.append(x)

    return l


print(f(15))


def f2(n):
    x, y, z = 0, 1, 1
    l = []
    while len(l) < n:
        x, y = y, z
        yield x
        z = x + y
        l.append(x)


fff = f2(15)

for x in fff:
    print(x)

print("{}网址：'{}!'".format("菜鸟教程", "www.runoob.com"))



f = open("./db/foo.txt", "w")

f.write("敞篷说他可真的不是一般的帅，\n  而是超级无敌的帅")

f.close()


f = open("./db/foo.txt", "r")

str = f.read()

print(str)

f.close()


f = open("./db/foo.txt", "r")

for line in f:
    print(line,end=" ")


f.close()



